namespace GameSchool.Migrations
{
    using System.Data.Entity.Migrations;
    
    public partial class eric33 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("Courses", new[] { "StudentAssignment_studentID", "StudentAssignment_assignmentID" }, "StudentAssignments");
            DropForeignKey("Assignments", new[] { "StudentAssignment_studentID", "StudentAssignment_assignmentID" }, "StudentAssignments");
            DropIndex("Courses", new[] { "StudentAssignment_studentID", "StudentAssignment_assignmentID" });
            DropIndex("Assignments", new[] { "StudentAssignment_studentID", "StudentAssignment_assignmentID" });
            DropColumn("Courses", "StudentAssignment_studentID");
            DropColumn("Courses", "StudentAssignment_assignmentID");
            DropColumn("Assignments", "StudentAssignment_studentID");
            DropColumn("Assignments", "StudentAssignment_assignmentID");
            DropColumn("StudentAssignments", "courseID");
            DropColumn("StudentAssignments", "studentName");
            DropColumn("StudentAssignments", "numAchievements");
            DropColumn("StudentAssignments", "numNotifications");
        }
        
        public override void Down()
        {
            AddColumn("StudentAssignments", "numNotifications", c => c.Int(nullable: false));
            AddColumn("StudentAssignments", "numAchievements", c => c.Int(nullable: false));
            AddColumn("StudentAssignments", "studentName", c => c.String());
            AddColumn("StudentAssignments", "courseID", c => c.Int(nullable: false));
            AddColumn("Assignments", "StudentAssignment_assignmentID", c => c.Int());
            AddColumn("Assignments", "StudentAssignment_studentID", c => c.Int());
            AddColumn("Courses", "StudentAssignment_assignmentID", c => c.Int());
            AddColumn("Courses", "StudentAssignment_studentID", c => c.Int());
            CreateIndex("Assignments", new[] { "StudentAssignment_studentID", "StudentAssignment_assignmentID" });
            CreateIndex("Courses", new[] { "StudentAssignment_studentID", "StudentAssignment_assignmentID" });
            AddForeignKey("Assignments", new[] { "StudentAssignment_studentID", "StudentAssignment_assignmentID" }, "StudentAssignments", new[] { "studentID", "assignmentID" });
            AddForeignKey("Courses", new[] { "StudentAssignment_studentID", "StudentAssignment_assignmentID" }, "StudentAssignments", new[] { "studentID", "assignmentID" });
        }
    }
}
